package com.huawei.appmarket.service.appdetail.view.card;

import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import com.huawei.appgallery.jsonkit.api.JsonBean;
import com.huawei.appmarket.service.appdetail.bean.detail.DetailReportBean;
import com.huawei.appmarket.service.appdetail.view.widget.DetailReportProtocol;
import com.huawei.appmarket.service.appdetail.view.widget.DetailReportProtocol.Request;
import com.huawei.appmarket.service.settings.view.widget.EnterLayout;
import java.util.List;
import o.cjk;
import o.cjm;
import o.cjo;
import o.ckt;
import o.drl;
import o.drq;
import o.CollectCheck;
import o.ewm.h;
import o.ewm.j;

public class DetailReportCard extends drl implements OnClickListener {
    private String ʻ;
    protected EnterLayout ʼ;
    protected String ॱॱ;

    public View ˊ(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.ˊ = layoutInflater.inflate(h.ˬ, null);
        this.ʼ = (EnterLayout) this.ˊ.findViewById(j.ˌʿ);
        this.ʼ.setMemoVisibility(8);
        this.ʼ.setLastLineGone();
        this.ʼ.setOnClickListener(new ckt(this));
        return this.ˊ;
    }

    public boolean ˊ(List<JsonBean> list) {
        if (CollectCheck.isEmpty(list)) {
            this.ʼ.setVisibility(8);
            return false;
        }
        DetailReportBean detailReportBean = (DetailReportBean) list.get(0);
        if (detailReportBean == null || TextUtils.isEmpty(detailReportBean.ˊ())) {
            this.ʼ.setVisibility(8);
            return false;
        }
        this.ʼ.setTitle(detailReportBean.ˊ());
        this.ॱॱ = detailReportBean.ͺˏ();
        this.ʻ = detailReportBean.ˊ();
        return true;
    }

    public void onClick(View view) {
        if (view.getId() == j.ˌʿ) {
            drq.ॱ(this, this.ॱॱ, 4);
            cjo detailReportProtocol = new DetailReportProtocol();
            Request request = new Request();
            request.ˊ(this.ॱॱ);
            request.ˎ(this.ʻ);
            detailReportProtocol.ˏ(request);
            cjk.ˎ().ˋ(view.getContext(), new cjm("detail.report.activity", detailReportProtocol));
        }
    }
}
